package com.wwwarehouse.contract.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/**
 * Created by zhenwang.xiang on 2017/11/2.
 * Description:
 */

public class BuyBean implements Parcelable {


    /**
     * list : [{"transactionStatus":"测试内容82mn","businessName":"网仓科技","contractId":"D52123204336636000","contractTime":"2017-10-24 14:21:34","contractUkid":"52123204336636000","demanderBusinessId":"260001","logoUrl":"/temp/1ae4ffff-76e8-4777-b30e-3caacab713c6.jpeg","orderStatus":"待发货","supplierBusinessId":"111111","totalAmount":"2970.00"},{"transactionStatus":"测试内容82mn","businessName":"网仓科技","contractId":"D52122802794619000","contractTime":"2017-10-23 17:05:47","contractUkid":"52122802794619000","demanderBusinessId":"260001","logoUrl":"/temp/1ae4ffff-76e8-4777-b30e-3caacab713c6.jpeg","orderStatus":"交易关闭","supplierBusinessId":"111111","totalAmount":"990.00"}]
     * page : 1
     * size : 10
     * total : 3
     */

    private int page;
    private int size;
    private int total;
    private ArrayList<ListBean> list;

    public void setPage(int page) {
        this.page = page;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public void setList(ArrayList<ListBean> list) {
        this.list = list;
    }

    public int getPage() {
        return page;
    }

    public int getSize() {
        return size;
    }

    public int getTotal() {
        return total;
    }

    public ArrayList<ListBean> getList() {
        return list;
    }

    public static class ListBean implements Parcelable {
        /**
         * transactionStatus : 测试内容82mn
         * businessName : 网仓科技
         * contractId : D52123204336636000
         * contractTime : 2017-10-24 14:21:34
         * contractUkid : 52123204336636000
         * demanderBusinessId : 260001
         * logoUrl : /temp/1ae4ffff-76e8-4777-b30e-3caacab713c6.jpeg
         * orderStatus : 待发货
         * supplierBusinessId : 111111
         * totalAmount : 2970.00
         */

        private String transactionStatus;
        private String businessName;
        private String contractId;
        private String contractTime;
        private String contractUkid;
        private String demanderBusinessId;
        private String logoUrl;
        private String orderStatus;
        private String supplierBusinessId;
        private String totalAmount;

        public void setTransactionStatus(String transactionStatus) {
            this.transactionStatus = transactionStatus;
        }

        public void setBusinessName(String businessName) {
            this.businessName = businessName;
        }

        public void setContractId(String contractId) {
            this.contractId = contractId;
        }

        public void setContractTime(String contractTime) {
            this.contractTime = contractTime;
        }

        public void setContractUkid(String contractUkid) {
            this.contractUkid = contractUkid;
        }

        public void setDemanderBusinessId(String demanderBusinessId) {
            this.demanderBusinessId = demanderBusinessId;
        }

        public void setLogoUrl(String logoUrl) {
            this.logoUrl = logoUrl;
        }

        public void setOrderStatus(String orderStatus) {
            this.orderStatus = orderStatus;
        }

        public void setSupplierBusinessId(String supplierBusinessId) {
            this.supplierBusinessId = supplierBusinessId;
        }

        public void setTotalAmount(String totalAmount) {
            this.totalAmount = totalAmount;
        }

        public String getTransactionStatus() {
            return transactionStatus;
        }

        public String getBusinessName() {
            return businessName;
        }

        public String getContractId() {
            return contractId;
        }

        public String getContractTime() {
            return contractTime;
        }

        public String getContractUkid() {
            return contractUkid;
        }

        public String getDemanderBusinessId() {
            return demanderBusinessId;
        }

        public String getLogoUrl() {
            return logoUrl;
        }

        public String getOrderStatus() {
            return orderStatus;
        }

        public String getSupplierBusinessId() {
            return supplierBusinessId;
        }

        public String getTotalAmount() {
            return totalAmount;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.transactionStatus);
            dest.writeString(this.businessName);
            dest.writeString(this.contractId);
            dest.writeString(this.contractTime);
            dest.writeString(this.contractUkid);
            dest.writeString(this.demanderBusinessId);
            dest.writeString(this.logoUrl);
            dest.writeString(this.orderStatus);
            dest.writeString(this.supplierBusinessId);
            dest.writeString(this.totalAmount);
        }

        public ListBean() {
        }

        protected ListBean(Parcel in) {
            this.transactionStatus = in.readString();
            this.businessName = in.readString();
            this.contractId = in.readString();
            this.contractTime = in.readString();
            this.contractUkid = in.readString();
            this.demanderBusinessId = in.readString();
            this.logoUrl = in.readString();
            this.orderStatus = in.readString();
            this.supplierBusinessId = in.readString();
            this.totalAmount = in.readString();
        }

        public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
            @Override
            public ListBean createFromParcel(Parcel source) {
                return new ListBean(source);
            }

            @Override
            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.page);
        dest.writeInt(this.size);
        dest.writeInt(this.total);
        dest.writeList(this.list);
    }

    public BuyBean() {
    }

    protected BuyBean(Parcel in) {
        this.page = in.readInt();
        this.size = in.readInt();
        this.total = in.readInt();
        this.list = new ArrayList<ListBean>();
        in.readList(this.list, ListBean.class.getClassLoader());
    }

    public static final Creator<BuyBean> CREATOR = new Creator<BuyBean>() {
        @Override
        public BuyBean createFromParcel(Parcel source) {
            return new BuyBean(source);
        }

        @Override
        public BuyBean[] newArray(int size) {
            return new BuyBean[size];
        }
    };
}
